import React, {Component} from 'react'
import {render} from 'react-dom'
import {Router, Route, IndexRoute, hashHistory} from 'react-router'

import Buy from '../Comment/Buy'
import Card from '../Comment/Card'
import School from '../Comment/School'

class Roots extends Component {
    render() {
        return (
            <div className='container'>{this.props.children}</div>
        );
    }
}

const RouteConfig = (
    <Router history={hashHistory}>
        <Route path='/' component={Roots}>
            <IndexRoute component={Card}/>
            <Route path="Buy(/:schoolid)" component={Buy}/>
            <Route path="School(/:schoolid)(/:status)" component={School}/>
        </Route>
    </Router>
)

export default RouteConfig;
